﻿//Prevent the TAB key in boxes
function checkTab(){
  if (event.keyCode == 9) { 
	event.returnValue = false;
  }
}

function onOpen() {
  // Get Saved Values
  var time = options.getValue("time_box");
  if (time==''){
	  time='300';
  }
  time_box.value=time;
  var display = options.getValue("display_box");
  if (display==''){
	  display='5';
  }
  display_box.value=display;
}
function onOk() {
  // Save all the settings
  options.putValue("time_box", time_box.value);
  options.putValue("display_box", display_box.value);
}
function chknum(box){
  var boxvalue=eval(box+ ".value;");
  if (isNaN(boxvalue)){
    alert(OPT_NAN);
    eval(box+ ".value='';");
    eval(box+ ".focus();");
  }
}